package com.tcy.game.angryrobots;

import com.badlogic.gdx.utils.Array;

/**
 * Created by 80002023 on 2016/7/27.
 */
public class AchievementsNotifier implements AchievementsListener {

    private final Array<AchievementsListener> listeners;

    public AchievementsNotifier () {
        this.listeners = new Array<AchievementsListener>();
    }

    public void addListener (AchievementsListener listener) {
        listeners.add(listener);
    }

    @Override
    public void onAttained (StatusManager.Achievements achievement) {
        for (AchievementsListener listener : listeners) {
            listener.onAttained(achievement);
        }
    }
}
